#ifndef MODERN_CHAT_APP_H
#define MODERN_CHAT_APP_H

#include <wx/wx.h>
#include <wx/splitter.h>
#include <wx/notebook.h>
#include <wx/textctrl.h>
#include <wx/choice.h>
#include <wx/button.h>
#include <wx/listbox.h>
#include <wx/stattext.h>
#include <wx/panel.h>
#include <wx/frame.h>
#include <wx/webview.h>

#include "agents.h"

class ModernChatFrame : public wxFrame {
public:
    ModernChatFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
    
private:
    void CreateControls();
    void SetupEventHandlers();
    void OnSendMessage(wxCommandEvent& event);
    void OnAgentChanged(wxCommandEvent& event);
    void OnClearHistory(wxCommandEvent& event);
    void AddMessageToHistory(const wxString& role, const wxString& content);
    
    wxSplitterWindow* splitter;
    wxPanel* leftPanel;
    wxPanel* rightPanel;
    wxChoice* agentChoice;
    wxTextCtrl* inputText;
    wxButton* sendButton;
    wxButton* clearButton;
    wxTextCtrl* chatDisplay;
    wxListBox* historyList;
    
    std::vector<std::unique_ptr<AIAgent>> agents;
    
    wxDECLARE_EVENT_TABLE();
};

#endif // MODERN_CHAT_APP_H
